<template>
  <section class="home-container">这是主应用的Home</section>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import actions from '@/shared/actions'
@Component
export default class Home extends Vue {
  mounted() {
    actions.onGlobalStateChange((state, prev) => {
      // state: 变更后的状态; prev 变更前的状态
      console.log('主应用状态发生改变', state, prev)
    })
    actions.setGlobalState({
      token: '123456',
    })
  }
}
</script>

<style lang="less" scoped>
.home-container {
  padding: 30px;
}
</style>
